package cn.ssm.util;

public class PageSite {
    private int start=0;
    private int end;
    private int count;
    private int number;

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public int getEnd() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public void calculateLast(int total) {
        if (total % count == 0) {
            this.end = total - count;
        }else {
            this.end = total - total % count;
        }
    }

    public void calculateNum(int total) {
        if (total % count == 0) {
            this.number = total / count;
        }else {
            this.number = total / count + 1;
        }
    }
}
